﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WJP.ComponentModel
{
    /// <summary>
    /// 用于定义插件对其它插件的依赖关系
    /// <para>插件应该派生自<see cref="PluginBase"/></para>
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public class DependsOnAttribute : Attribute
    {
        /// <summary>
        /// 依赖插件的类型
        /// </summary>
        public Type[] DependedPluginTypes { get; private set; }

        /// <summary>
        /// 用于定义插件对其它插件的依赖关系
        /// </summary>
        /// <param name="dependedPluginTypes">依赖插件的类型</param>
        public DependsOnAttribute(params Type[] dependedPluginTypes)
        {
            DependedPluginTypes = dependedPluginTypes;
        }
    }
}
